/** 
* @param {array}
* @param {function}
* @returns {void}
**/
function forEachRight(array, callback) {
  if (!Array.isArray(array)) return
  let i = array.length

  while(--i > -1) {
    callback(array[i], i, array)
  }
}

export default forEachRight